dy-lib = libmymethod.so
static-lib = libmymath.a

.PHNOY:all
all:$(dy-lib) $(static-lib)


$(dy-lib):myprint.o mylog.o
	gcc -shared -o $@ $^

$(static-lib):mymath.o
	ar -rc $@ $^

mymath.o:mymath.c
	gcc -c $^

myprint.o:myprint.c
	gcc -fPIC -c $^

mylog.o:mylog.c
	gcc -fPIC -c $^

.PHNOY:clean 
clean:
	rm -rf *.o *.a *.so mylib 

.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp *.h mylib/include
	cp *.a mylib/lib
	cp *.so mylib/lib
